package cn.yunhe.video.Service.impl;

import cn.yunhe.video.Service.IGreatService;
import cn.yunhe.video.dao.IGreatDao;
import cn.yunhe.video.entity.Great;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GreatServiceImpl extends ServiceImpl<IGreatDao, Great> implements IGreatService {
    @Autowired
    private IGreatDao greatDao;
    @Override
    public Great queryGreat(Great great) {
        return greatDao.queryGreat(great);
    }

    @Override
    public boolean addLike(Great great) {
        int num = greatDao.addLike(great);
        if(num>0){
            return true;
        }else{
            return false;
        }
    }

    @Override
    public boolean delLike(Great great) {
        int num = greatDao.delLike(great);
        if(num>0){
            return true;
        }else{
            return false;
        }
    }
}
